'''
Created on 2016年8月17日

@author: fxd
'''
from pip._vendor.distlib.compat import raw_input

str= raw_input("请输入内容:")
print('你输入的内容是',str)

str=input('请输入内容：')
print(str)

fo = open("1.txt", 'w+')
#attribute
print(fo.name)
print(fo.closed)
print(fo.mode)

fo.write("Hello World!\nI am from China")
print(fo.tell())
#relocate
fo.seek(0,0)
str = fo.read(10)
print(str)

fo.close()
#rename
import os
os.remove('1.1.txt')
os.renames("1.txt", "1.1.txt")

print(dir(os))
#os.mkdir(path, mode=0o777, *, dir_fd=None)
#os.rmdir(path, *, dir_fd=None)
#os.listdir(path='_')